package com.voice.server.connection;

import com.alibaba.nls.client.protocol.asr.SpeechTranscriber;
import com.voice.core.connection.impl.SocketChannelConnectionImpl;
import com.wangjiacai.utils.ali.NettyConnection;
import lombok.Data;


@Data
public class DeviceStreamConnection extends SocketChannelConnectionImpl {

    private String userId;
    private String deviceKey;
    private SpeechTranscriber speechTranscriber;
    private NettyConnection nettyConnection;

    public DeviceStreamConnection(SocketChannelConnectionImpl connection, String userId, String deviceKey){
        super(connection.getCurrentStreamId().get());
        this.socketChannelAdapter=connection.getSocketChannelAdapter();
        this.socketChannelAdapter.setConnection(this);
        this.deviceKey = deviceKey;
        this.userId=userId;
    }

}
